﻿//
// Created: 2018/8/14
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.Admin;

namespace Model.Admin.Map
{
    internal  class AdminRoleMenuMap:EntityTypeConfiguration< AdminRoleMenu >    
    {
        public AdminRoleMenuMap()
        {
             this.ToTable("Admin_RoleMenu");
             this.HasKey(i => new { i.ID });
             this.Property(i => i.ID).HasColumnName("ID");                     
             this.Property(i => i.RoleId).HasColumnName("RoleId");                     
             this.Property(i => i.MenuId).HasColumnName("MenuId");                     
        }   
    }
    
     public static class AdminRoleMenuMapExtensions
    {
        public static void UserAdminRoleMenuMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new AdminRoleMenuMap());
        }
    }
}